package com.abaaba.project2.controller;

import com.abaaba.project2.bean.vo.BaseRespVo;
import com.abaaba.project2.bean.vo.UserInfoVo;
import com.abaaba.project2.service.AdminUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/user")
public class AdminUserController {

    @Autowired
    AdminUserService userService;

    @RequestMapping("/list")
    public BaseRespVo getUserList(String username, String mobile, Integer page, Integer limit, String sort, String order) {
        UserInfoVo userInfoVO = userService.getUserList(username, mobile, page, limit, sort, order);
        return BaseRespVo.ok(userInfoVO);
    }
}
